package hust.game.main;

import hust.game.screen.SplashScreen;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.assets.AssetManager;

public class MyGame extends Game {
	public AssetManager manager;
//	public SoundManager sound;
	public float assumeWidth;
	public float assumeHeight;

	@Override
	public void create() {
		manager = new AssetManager();
//		sound = new SoundManager();
		fixResolution();
		setScreen(SplashScreen.getInstance());
	}

	private void fixResolution() {
		// 960x640
		// 480x32
		assumeWidth = 800;
		assumeHeight = 480;
	}
	public float convertWidth(float x){
		// if(viewport 480x320) return x/2;
		return x;
	}
	public float convertHeight(float y){
		// if(viewport 480x320) return y/2;
		return y;
	}
	private static MyGame instance = null;

	public static MyGame getInstance() {
		if (instance == null) {
			instance = new MyGame();
		}
		return instance;
	}

}
